<template>
	<div>
		<u-table ref="table" v-loading="$parent.loading" :data="value" row-key="ReferrerID" :use-virtual="useVirtual"
			v-bind="$props" v-on="$listeners">
			<slot name="SysStore.EnumSysStoreTypeBefore"></slot>
			<slot name="SysStore.EnumSysStoreType">
				<u-table-column prop="SysStore.EnumSysStoreType" v-if="user.isAdminStore||user.isMainStore" :label="comLan['Key']['SysStore']['EnumSysStoreType']" width="80" align="center">
					<template v-slot="scope">
						<span v-html="getLabel(scope.row.SysStore.EnumSysStoreType,EnumSysStoreType)"></span>
					</template>
				</u-table-column>
			</slot>
			<slot name="SysStore.EnumSysStoreTypeAfter"></slot>
			<slot name="SysStore.SysStoreNameBefore"></slot>
			<slot name="SysStore.SysStoreName">
				<u-table-column prop="SysStore.SysStoreName" v-if="user.isAdminStore||user.isMainStore" :label="comLan['Key']['SysStore']['SysStoreName']" width="180" align="left"></u-table-column>
			</slot>
			<slot name="SysStore.SysStoreNameAfter"></slot>
			<slot name="SysStore.PhoneNumberBefore"></slot>
			<slot name="SysStore.PhoneNumber">
				<u-table-column prop="SysStore.PhoneNumber" v-if="user.isAdminStore||user.isMainStore" :label="comLan['Key']['SysStore']['PhoneNumber']" width="80" align="left"></u-table-column>
			</slot>
			<slot name="SysStore.PhoneNumberAfter"></slot>
			<slot name="SysStore.EnumStatusBefore"></slot>
			<slot name="SysStore.EnumStatus">
				<u-table-column prop="SysStore.EnumStatus" v-if="user.isAdminStore||user.isMainStore" :label="comLan['Key']['SysStore']['EnumStatus']" width="50" align="center">
					<template v-slot="scope">
						<span v-html="getLabel(scope.row.SysStore.EnumStatus,EnumStatus)"></span>
					</template>
				</u-table-column>
			</slot>
			<slot name="SysStore.EnumStatusAfter"></slot>
			<slot name="HeaderUrlBefore"></slot>
			<slot name="HeaderUrl">
				<u-table-column prop="HeaderUrl" :label="keyLan['HeaderUrl']" width="95" align="center">
					<template v-slot="scope">
						<el-image class="img" :preview-src-list="HeaderUrlImageList" :src="scope.row.HeaderUrl"
							v-if="!!scope.row.HeaderUrl">
						</el-image>
					</template>
				</u-table-column>
			</slot>
			<slot name="HeaderUrlAfter"></slot>
			<slot name="NameBefore"></slot>
			<slot name="Name">
				<u-table-column prop="Name" :label="keyLan['Name']" width="180" align="left"></u-table-column>
			</slot>
			<slot name="NameAfter"></slot>
			<slot name="PhoneBefore"></slot>
			<slot name="Phone">
				<u-table-column prop="Phone" :label="keyLan['Phone']" width="50" align="left"></u-table-column>
			</slot>
			<slot name="PhoneAfter"></slot>
			<slot name="EnumStatusBefore"></slot>
			<slot name="EnumStatus">
				<u-table-column prop="EnumStatus" :label="keyLan['EnumStatus']" width="50" align="center">
					<template v-slot="scope">
						<span v-html="getLabel(scope.row.EnumStatus,EnumStatus)"></span>
					</template>
				</u-table-column>
			</slot>
			<slot name="EnumStatusAfter"></slot>
			<slot name="CreateSysEmployeeIDBefore"></slot>
			<slot name="CreateSysEmployeeID">
				<u-table-column prop="CreateSysEmployeeID" :label="keyLan['CreateSysEmployeeID']" width="80" align="right"></u-table-column>
			</slot>
			<slot name="CreateSysEmployeeIDAfter"></slot>
			<slot name="CreateDateBefore"></slot>
			<slot name="CreateDate">
				<u-table-column prop="CreateDate" :label="keyLan['CreateDate']" width="160" align="center">
					<template v-slot="scope">
						<span v-if="!!scope.row.CreateDate">{{scope.row.CreateDate | datetime}}</span>
					</template>
				</u-table-column>
			</slot>
			<slot name="CreateDateAfter"></slot>
			<slot name="RemarkBefore"></slot>
			<slot name="Remark">
				<u-table-column prop="Remark" :label="keyLan['Remark']" align="left"></u-table-column>
			</slot>
			<slot name="RemarkAfter"></slot>
			
			<u-table-column2 v-if="showOp">
				<template v-slot="scope">
					<slot name="replace" :row='scope.row' :$index='scope.$index' :column="scope.column"
						:store="scope.store" :_self="scope._self">
						<slot name="btnEdit" :row='scope.row' :$index='scope.$index' :column="scope.column"
							:store="scope.store" :_self="scope._self">
							<el-button type="text" @click="btnEditParent(scope)" v-if="buttonParent.编辑">
								{{comLan["btnEdit"]}}
							</el-button>
						</slot>
						<slot name="btnEnumStatus" :row='scope.row' :$index='scope.$index' :column="scope.column"
							:store="scope.store" :_self="scope._self">
							<el-button type="text" @click="btnEnumStatusParent(scope,scope.row.EnumStatus==0?1:0)"
								v-if="buttonParent.启用禁用">
								{{scope.row.EnumStatus==0 ? comLan["btnEnable"] : comLan["btnDisable"]}}
							</el-button>
						</slot>
						<slot name="btnDel" :row='scope.row' :$index='scope.$index' :column="scope.column"
							:store="scope.store" :_self="scope._self">
							<el-button type="text" @click="btnDelParent(scope)" v-if="buttonParent.删除">
								{{comLan["btnDel"]}}
							</el-button>
						</slot>
						<slot :row='scope.row' :$index='scope.$index' :column="scope.column" :store="scope.store"
							:_self="scope._self"></slot>
					</slot>
				</template>
			</u-table-column2>
		</u-table>
		<el-pagination v-if="showPage" :current-page="$parent.search.index" :page-size="$parent.search.size"
			:total="$parent.total" @current-change="indexChangeParent" @size-change="sizeChangeParent"></el-pagination>
	</div>
</template>

<script>
	import common from "@/common/common.js";
	import js from "@/Partial/Referrer/js.js";
	export default {
		name: "ReferrerListTable",
		mixins: [common.baseVM, js]
	}
</script>
